Developer Documentation
PATHJava Developer Documentation > Mac OS Runtime for Java > MRJToolkit > Programming With MRJToolkit


The MRJOpenDocumentHandler Interface

The com.apple.mrj.MRJOpenDocumentHandler interface contains one method, handleOpenFile , which is called when a document file needs to be opened.


handleOpenFile

Handles opening a document file.

public void handleOpenFile (File fileName);
fileName
The name of the file to be opened.

DISCUSSION

This application-defined method is called when a document needs to be opened from the Finder. For example, this situation occurs when the user selects an Open menu item in the Finder or if the user double-clicks a file that bears the application's creator. You must register the method name by calling the registerOpenDocumentHandler method registerOpenDocumentHandler when initializing the application. The handleOpenFile method is only useful if you have packaged your Java application using JBindery.

SEE ALSO

The registerOpenDocumentHandler method registerOpenDocumentHandler .


© 1998 Apple Computer, Inc. — (Last Updated 10 Dec 98)